\section{System model}
\label{sec:model}

Consider a task set $\tau = \left\{\tau_1, \tau_2, \ldots, \tau_n\right\}$ of $n$ constrained-deadline self-suspending sporadic tasks scheduled on a single processor. Each task $\tau_i$ releases a (potentially infinite) sequence of \textit{jobs}, with the first job released at any time during the system execution and subsequent jobs released \emph{at least} $T_i$ (referred to as \textit{minimum inter-arrival time}) time units apart. Each job released by $\tau_i$ has to complete its execution within $D_i \leq T_i$ (referred to as $\tau_i$'s \textit{deadline}) time units from its release.

A task $\tau_i$ consists of $m_i \geq 1$ \textit{execution regions} and $m_i-1$ \textit{suspension regions} such that any two consecutive execution regions are separated by a suspendion region as shown in Fig.~\ref{fig:task-model}. 
\begin{figure}[t] 
   \includegraphics[height=1.7cm, width=8.8cm]{task-model}
   \caption{Constrained-deadline self-suspending sporadic task.}
  \label{fig:task-model}
\end{figure}
Formally, each self-suspending task $\tau_i$ is characterized as follows: $\tau_i \equals \left\langle \left(C_{i,1}, S_{i,1}, C_{i,2}, S_{i,2}, \ldots, S_{i,m_i-1}, C_{i,m_i},\right), D_i, T_i\right\rangle$ where (i) $C_{i,j}$ denotes the worst-case execution time of the $j$th execution region; (ii) $S_{i,j}$ denotes the worst-case duration of the $j$th suspension region; (iii) $m_i$ denotes the number of execution regions separated by $m_i-1$ suspension regions; (iv) $D_i \leq T_i$ denotes the deadline before which all the execution regions must finish their execution and (v) $T_i$ denotes the minimum inter-arrival time between two successive jobs of $\tau_i$. In this paper, we call \emph{non-self-suspending task}, a task with no suspension regions. A non-self-suspending task $\tau_k$ is represented as: $\tau_k \equals \left\langle \left(C_{k,1}\right), D_k, T_k\right\rangle$. 

%In section~IV, we consider a special case of self-suspending tasks in which a self-suspending task has only two execution regions, i.e., $m_i=2$, separated by a single self-suspending region. In the rest of the paper, we consider a generic self-suspending task model in which $m_i \geq 1$.

We assume that a fixed-priority scheduling policy is used to schedule the tasks on the processor. For convenience, we denote by $\tau_{i,j}$ the $j$th execution region of task $\tau_i$, and the overall worst-case execution time of $\tau_i$ is defined as $C_i \equals \sum_{j=1}^{m_i}C_{i,j}$. The first execution region $\tau_{i,1}$ of a job of task $\tau_i$ becomes ready for execution (also referred to as the \textit{arrival time} of $\tau_{i,1}$ and denoted by $a_{i,1}$) as soon as that job of task $\tau_i$ is released. The response time $R_{i,1}$ of the execution region $\tau_{i,1}$ is the difference between its \textit{completion time} (denoted by $f_{i,1}$) and the arrival time of the job; formally, $R_{i,1}=f_{i,1}-a_{i,1}$. For $2 \leq j \leq m_i$, the execution region $\tau_{i,j}$ of a job of task $\tau_i$ becomes ready for execution %(also referred to as the \textit{arrival time} of $\tau_{i,j}$ and is denoted by $a_{i,j}$) 
at time $a_{i,j} \equals f_{i,j-1} + s_{i,j-1}$ (where $s_{i,j-1} \leq S_{i,j-1}$ is the duration of the $(j-1)^\text{th}$ self-suspension region) and its response time $R_{i,j}$ is given by the difference between its completion time and its arrival time; formally, $R_{i,j}=f_{i,j}-a_{i,j}$. 
%The response time $R_i$ of a job of task $\tau_i$ is the sum of the response times of the last execution region $\tau_{i,m_i}$ of $\tau_i$ with the arrival time $a_{i,m_i}$ of $\tau_{i,m_i}$, that is, $R_i \equals \sum_{j=1}^{m_i}R_{i,j}+\sum_{j=1}^{m_i-1}s_{i,j}$.
The response time $R_i$ of a job of task $\tau_i$ is the sum of the response times of all its execution regions, plus the sum of the duration of all its suspension regions, that is, $R_i \equals \sum_{j=1}^{m_i}R_{i,j}+\sum_{j=1}^{m_i-1}s_{i,j}$.
Finally, the \textit{worst-case response time} $\WCRT{i}$ \textit{of a task} $\tau_i$ is defined as the largest response time that any job of $\tau_i$ may ever experience.

%In Sections~\ref{sec:misconceptions} to~\ref{sec:MILP}, we consider the case in which the task set $\tau$ contains only one self-suspending task. This task is denoted $\sstask$ and has the lowest priority. All the other tasks in $\tau$ are non-self-suspending and have a higher priority than $\sstask$. We denote the set of higher priority non-self-suspending tasks as $\hp{ss}$. 
In Sections~\ref{sec:misconceptions} to~\ref{sec:MILP}, we consider the case in which the task set $\tau$ has only one self-suspending task and all the other tasks are non-self-suspending. The self-suspending task is denoted $\sstask$ and has the lowest priority, i.e., all the non-self-suspending tasks in $\tau$ have a higher priority than $\sstask$. We denote the set of higher priority non-self-suspending tasks as $\hp{ss}$. The restriction of having only one self-suspending task in the taskset is relaxed in Section~\ref{sec:multipleSStasks}.

%We assume that a fixed-priority scheduling policy is used to schedule the tasks on the processor. We also assume that for the purpose of computing the worst-case response time of a task $\tau_i$, every task $\tau_k$ whose priority is higher than that of $\tau_i$ is modeled as a non-suspending task as follows: a self-suspending task $\tau_k \equals \left\langle \left(C_{k,1}, S_{i,1}, C_{k,2}, S_{k,2}, \ldots, S_{k,m_k-1}, C_{k,m_k},\right), D_k, T_k\right\rangle$ is modeled as $\tau_k \equals \left\langle \left(C_{k}\right), D_k, T_k\right\rangle$. (HOW DO WE ELABORATE ON THIS?)